Skip to content

Conversation

@NicoHinderling
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 10:15pm
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 10:15pm

cursor[bot]

This comment was marked as outdated.

@NicoHinderling NicoHinderling changed the title feat(launchpad): create size analysis download endpoint (dont merge) test prefetching markdown text to get around ios security blocking async call on gesture Jul 14, 2025
@codecov
Copy link

codecov bot commented Jul 14, 2025

Bundle Report

Changes will increase total bundle size by 256 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 9.83MB 172 bytes (0.0%) ⬆️
sentry-docs-server-cjs 11.92MB 84 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 879.57kB -0.0%
static/chunks/1831-*.js -3 bytes 422.11kB -0.0%
static/chunks/4145-*.js 178 bytes 49.52kB 0.36%
server/middleware-*.js -5.55kB 1.0kB -84.74%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
static/mbc_8eWst7w4xsnFnDRmK/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/mbc_8eWst7w4xsnFnDRmK/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/c_6BG46bL9Sg7O30WM0s9/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/c_6BG46bL9Sg7O30WM0s9/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.67MB -0.0%
../instrumentation.js -3 bytes 996.78kB -0.0%
9523.js -3 bytes 972.72kB -0.0%
4873.js 93 bytes 89.27kB 0.1%

Files in 4873.js:

  • ./src/components/copyMarkdownButton.tsx → Total Size: 494 bytes

@NicoHinderling NicoHinderling changed the title (dont merge) test prefetching markdown text to get around ios security blocking async call on gesture chore(ai): prefetch the markdown text to get around ios security blocking async call on gesture Jul 14, 2025
@NicoHinderling NicoHinderling force-pushed the dontmerge-test-prefetch-md-text branch from bf8b078 to b546c8c Compare July 14, 2025 21:52
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@codyde codyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Prefetching Hook Fails to Update Content

The prefetching useEffect fails to update content when the pathname changes. Because prefetchedContent retains the old page's data, the if (!prefetchedContent) condition prevents fetching new content. This results in the copy button providing stale markdown from the previous page.

src/components/copyMarkdownButton.tsx#L97-L110

// fetch on tap because the user gesture is lost by the time we try to update the clipboard.
useEffect(() => {
if (!prefetchedContent) {
const prefetchContent = async () => {
try {
const content = await fetchMarkdownContent();
setPrefetchedContent(content);
} catch (err) {
// Silently fail - we'll fall back to regular fetch on click
}
};
prefetchContent();
}
}, [pathname, prefetchedContent, fetchMarkdownContent]);

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@NicoHinderling NicoHinderling merged commit c3759fe into master Jul 14, 2025
15 checks passed
@NicoHinderling NicoHinderling deleted the dontmerge-test-prefetch-md-text branch July 14, 2025 22:19
lucas-zimerman pushed a commit that referenced this pull request Jul 29, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants